<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML>
<%@include file="/common/taglibs.jsp" %>
<%@include file="/common/javascript.jsp" %>
<html>
	<head>
		<meta charset="utf-8">
    	<title>最新动态</title>
    	<script type="text/javascript">
    		var chart;
			$(document).ready(function() {
				chart = createChart();
			});
		
		function createChart(){
			return new Highcharts.Chart({
				chart: {
					renderTo: 'container',
					width:500,
					height:300,
					defaultSeriesType: 'column'
				},
				title: {
					text: '${model.name}楼盘数据统计'
				},
				xAxis: {
					categories: ['已推盘面积(m²)', '已推盘套数', '已售面积(m²)', '已售套数', '销售均价(元)']
				},
				yAxis: {
					min: 0,
					title: {
						text:'',
						align: 'high'
					}
				},
				tooltip: {
					formatter: function() {
						return '<b>'+ this.x +': '+ this.y +'</b>';
					}
				},
				plotOptions: {
					bar: {
						dataLabels: {
							enabled: true,
							color: 'auto'
						}
					}
				},
				legend: {
					layout: 'vertical',
					style: {
						left: 'auto',
						bottom: 'auto',
						right: '50px',
						top: '50px'
					},
					borderWidth: 1,
					backgroundColor: '#FFFFFF'
				},
				credits: {
					enabled: false
				},
			    series: [{
					name: '${model.name}楼盘',
					data: [eval(('${model.ytpArea}')),eval(('${model.ytpTs}')),eval(('${model.ysArea}')),
							eval(('${model.ysTs}')),eval(('${model.averagePrice}'))],
					dataLabels: {
                    	enabled: true,
                	}
				}]
			});
		}
    	</script>
	</head>
  
	<body style="margin:0px; overflow-style:clear; padding:0px;" >
    	<div data-options="region:'north',border:true" style="height:auto;margin: 10px;border: 2px;border-color: blue;">
    		<table>
    			<tr>
    				<td>楼盘介绍:</td>
    				<td>${model.description}</td>
    			</tr>
    		</table>
    		
    	</div>
    	<div  data-options="region:'center'">
    		<div id="container" style="min-width 400px; min-height:300px;margin: 0 auto" ></div>
    	</div>
  	</body>
</html>
